#include "TGameObject.h"
#include "ResMgr.h"
#include <string>
#include "TGameObject.h"
#include "EventSupport.h"
#include "EventArgs.h"
#include "IClickable.h"

using std::string;

class Button : public TGameObject, public EventSupport<ClickEventArgs>, public IClickable
{    
    string m_Caption;
    int m_textWidth;
    int m_textHeight;
    RECT m_Rect;
    TGDKSprite *spr; 
public:
    Button(string caption, int x, int y);
    int GetWidth();
    int GetHeight();
    void SetPosition(int x, int y);
    virtual ~Button();
protected:

    virtual void OnDraw();

    virtual void OnClick( int x, int y );

    virtual RECT* GetRect();

    virtual void OnHover( int x, int y );

    virtual void OnLeave();

    virtual TGDKSprite* GetMainSprite();

};